<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>

	<title>{% block title %}{{settings.SITE_NAME|default:"Worrdy"}}{% endblock %}</title>

	<link href="/media/css/default.css" media="screen" rel="stylesheet" type="text/css" />
  	<script src="/media/js/prototype.js" type="text/javascript"></script>
	<script src="/media/js/effects.js" type="text/javascript"></script>
	<script src="/media/js/dragdrop.js" type="text/javascript"></script>
	<script src="/media/js/controls.js" type="text/javascript"></script>
	<script src="/media/js/application.js" type="text/javascript"></script>
  {% block extrastyle %}{% endblock %}
  {% block extrahead %}{% endblock %}
  {% block seorobots %}{% endblock %}
</head>

<body>

  <div id="header">
    <div id="global_links">
	<a href="/">Home</a> |
	<a href="/">Dashboard</a> |
 {% if user.is_authenticated%}
<strong>{{user.nickname}}</strong> |
<a href="/accounts/profile/">My Account</a> |
 {% if user.is_staff%}
<a href="/admin/">Administration</a> |
 {% endif %}
<a href="/accounts/logout/">Log out</a> |
{% else %}
<a href="/accounts/signin/">Sign In</a> |
<a href="/accounts/signup/">Sign Up</a> |
 {% endif %}

{% block userlinks %}
<a href="/">Blog</a> |
<a href="/">Contact</a> |
<a href="/">Faq</a> |
{% endblock %}
<a href="/">Help</a> |

    </div>

    <h1> {{settings.SITE_NAME|default:"Worrdy"}}<span>PHPython.CN</span></h1>

    <div id="tabs">
      <ul>
	<li style="float: right;"><a href="/accounts/profile/" class="current">Profile</a></li>

	<li><a href="/accounts/dashboard/">Dashboard</a></li>

</ul>
    </div>
  </div>

{% if messages %}
<ul class="messagelist">{% for message in messages %}<li>{{ message|escape }}</li>{% endfor %}</ul>
{% endif %}

  <div id="main">
        {% block content %}
		{% block content_title %}{% if title %}<h1>{{ title|escape }}</h1>{% endif %}{% endblock %}

		<div id="left">
        {{ content }}
		</div>
        {% endblock %}

	{% block sidebar %}
    <div id="right">
      <p>Have a look at our site,plz....</p>
    </div>
	{% endblock %}
  </div>

{% block footer %}<div id="footer">
    {{settings.SITE_NAME|default:"Worrdy"}} by <a href="phpython@gmail.com">PHPython</a><br />
	Copyright © <a href="http://www.phpython.cn/">PHPython.CN</a>
  </div>
{% endblock %}
{* assert 'django.core.context_processors.debug' in settings.TEMPLATE_CONTEXT_PROCESSORS ,'error'*}
{* assert reqeust.remote_addr in settings.INTERNAL_IPS ,'error'*}
{* RequestContext *}
{% if debug %}
<div id="debug">
  <h2>Queries</h2>
  <p>
    {{ sql_queries|length }} Quer{{ sql_queries|pluralize:"y,ies" }}
    {% ifnotequal sql_queries|length 0 %}
    (<span style="cursor: pointer;" onclick="var s=document.getElementById('debugQueryTable').style;s.display=s.display=='none'?'':'none';this.innerHTML=this.innerHTML=='Show'?'Hide':'Show';">Show</span>)
    {% endifnotequal %}
  </p>
  <table id="debugQueryTable" style="display: none;">
    <col width="1"></col>
    <col></col>
    <col width="1"></col>
    <thead>
    <tr>
      <th scope="col">#</th>
      <th scope="col">SQL</th>
      <th scope="col">Time</th>
    </tr>
    </thead>
    <tbody>
    {% for query in sql_queries %}<tr class="{% cycle odd,even %}">
      <td>{{ forloop.counter }}</td>
      <td>{{ query.sql|escape }}</td>
      <td>{{ query.time }}</td>
    </tr>{% endfor %}
    </tbody>
  </table>
</div>
{% endif %}

</body>
</html>
